# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=vanguard
pkgver=0.1
pkgrel=10
groups=('blackarch' 'blackarch-webapp' 'blackarch-scanner')
pkgdesc='A comprehensive web penetration testing tool written in Perl thatidentifies vulnerabilities in web applications.'
arch=('any')
url='http://packetstormsecurity.com/files/110603/Vanguard-Pentesting-Scanner.html'
license=('custom:unknown')
depends=('perl' 'perl-clone' 'perl-data-dumper' 'perl-yaml' 'perl-libwww'
        'perl-io-socket')
source=('https://dl.packetstormsecurity.net/UNIX/scanners/vanguard-public.tgz')
sha512sums=('341aac4ff802bec2df1d4bdaa75accf5634ccde794485b76e79df69f0f2e95a3e68e998ee312affb716b5a1d31bc156e2cfb2eecd1c06f1682c97a3f8cdd5e36')

package() {
  cd "$pkgname-public"

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  cp -a * "$pkgdir/usr/share/$pkgname/"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname
exec perl -I. scan.pl "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

